﻿CREATE TRIGGER UsersProjects_Tracking_Delete
ON [dbo].[UsersProjects] 
AFTER delete
AS 
BEGIN
	UPDATE Sync.UsersProjects_Tracking 
	SET LastUpdatedDate  = getdate(),
		IsDeleted = 1
	FROM Sync.UsersProjects_Tracking s JOIN DELETED i
    ON s.ProjectID = i.ProjectID AND s.UserID = i.UserID
END














